import { Button, Result } from 'antd';
import React from 'react';
import { history } from 'umi';
import { FormattedMessage } from '@@/plugin-locale/localeExports';

const UnAccessiblePage: React.FC = () => (
  <Result
    status="403"
    title="403"
    subTitle="对不起，你没有访问这个页面的权限"
    extra={
      <Button type="primary" onClick={() => history.push('/user/login')}>
        <FormattedMessage id="pages.login.goLogin" defaultMessage="前往登录" />
      </Button>
    }
  />
);

export default UnAccessiblePage;
